<template>
        <div class="list">
            <div class="list-item" @click="todetail(v.teacher_id)">
            <div class="l"><img :src="v.teacher_avatar" alt=""></div>
                <div class="r">
                    <p>{{v.teacher_name}}</p>
                    <span>{{v.introduction}}</span>
                </div>
            </div>
        </div>
</template>

<script>
export default {
    props: ['v'],
    methods:{
        todetail(id) {
            this.$router.push({ path: "/teach", query: { "id": id } })
        }
    }
}
</script>

<style lang="scss" scoped>
.list {
    width: 100%;

    .list-item {
        background-color: #fff;
        line-height: 30px;
        display: flex;
        justify-content: center;
        align-items: center;

        .l {
            margin-top: 10px;
            margin-left: 30px;
            width: 50px;

            img {
                width: 35px;
                height: 35px;
                border-radius: 50%;
            }
        }

        .r {
            flex: 1;
            display: flex;
            flex-direction: column;

            p {
                font-size: 16px;
            }

            span {
                color: #999;
                font-size: 14px;
            }
        }
    }
}
</style>
